use chrono::Local;

const VERSION: &'static str = env!("CARGO_PKG_VERSION");

pub fn generate() -> String {
    format!("         _     _                 _         _           _        _                 _         _           _           _     
        /\\ \\  /\\_\\              / /\\      /\\ \\        / /\\     /\\_\\              / /\\      /\\ \\        /\\ \\        /\\ \\   
       /  \\ \\/ / /         _   / /  \\     \\_\\ \\      / /  \\   / / /         _   / /  \\     \\_\\ \\      /  \\ \\      /  \\ \\  
      / /\\ \\ \\ \\ \\__      /\\_\\/ / /\\ \\__  /\\__ \\    / / /\\ \\  \\ \\ \\__      /\\_\\/ / /\\ \\__  /\\__ \\    / /\\ \\ \\    / /\\ \\ \\ 
     / / /\\ \\_\\ \\___\\    / / / / /\\ \\___\\/ /_ \\ \\  / / /\\ \\ \\  \\ \\___\\    / / / / /\\ \\___\\/ /_ \\ \\  / / /\\ \\_\\  / / /\\ \\_\\
    / / /_/ / /\\__  /   / / /\\ \\ \\ \\/___/ / /\\ \\ \\/ / /\\ \\_\\ \\  \\__  /   / / /\\ \\ \\ \\/___/ / /\\ \\ \\/ /_/_ \\/_/ / / /_/ / /
   / / /__\\/ / / / /   / / /  \\ \\ \\    / / /  \\/_/ / /\\ \\ \\___\\ / / /   / / /  \\ \\ \\    / / /  \\/_/ /____/\\   / / /__\\/ / 
  / / /_____/ / / /   / / _    \\ \\ \\  / / /     / / /  \\ \\ \\__// / /   / / _    \\ \\ \\  / / /     / /\\____\\/  / / /_____/  
 / / /\\ \\ \\  / / /___/ / /_/\\__/ / / / / /     / / /____\\_\\ \\ / / /___/ / /_/\\__/ / / / / /     / / /______ / / /\\ \\ \\    
/ / /  \\ \\ \\/ / /____\\/ /\\ \\/___/ / /_/ /     / / /__________/ / /____\\/ /\\ \\/___/ / /_/ /     / / /_______/ / /  \\ \\ \\   
\\/_/    \\_\\/\\/_________/  \\_____\\/  \\_\\/      \\/_____________\\/_________/  \\_____\\/  \\_\\/      \\/__________\\/_/    \\_\\/   

")
}

pub fn copyright() -> String {
    format!(
        "~ rustbuster v{} ~ by phra & ps1dr3x ~
",
        VERSION
    )
}

#[allow(dead_code)]
pub fn configuration(mode: &str, url: &str, threads: &str, wordlist: &str) -> String {
    format!(
        "[+] Mode\t: {}
[+] Url/Domain\t: {}
[+] Threads\t: {}
[+] Wordlist\t: {}",
        mode, url, threads, wordlist
    )
}

pub fn starting_time() -> String {
    format!(
        "[?] Started at\t: {}\n",
        Local::now().format("%Y-%m-%d %H:%M:%S").to_string()
    )
}

pub fn ending_time() -> String {
    format!(
        "\n[?] Ended at: {}",
        Local::now().format("%Y-%m-%d %H:%M:%S").to_string()
    )
}
